package javacore.Statements;

public class ForLoop {

	
	public static void main(String[] args) {
		// Using the while loop to calculate sum
		
		int limit = 20;
	    int sum = 0;

	    for (int i=1; i <= limit; i++) {
	      sum = sum + i;
	    }
	    System.out.println("sum = " + sum);

	}

}
